﻿@model Chbl.Models.Game

@{
    ViewBag.Title = "Редактирование игры";
}

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Информация об игре</legend>

        @Html.HiddenFor(model => model.GameId)

        <div class="editor-label">
            @Html.LabelFor(model => model.HomeTeamId, "Хозяева")
        </div>
        <div class="editor-field">
            @Html.DropDownList("HomeTeamId", String.Empty)
            @Html.ValidationMessageFor(model => model.HomeTeamId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RoadTeamId, "Гости")
        </div>
        <div class="editor-field">
            @Html.DropDownList("RoadTeamId", String.Empty)
            @Html.ValidationMessageFor(model => model.RoadTeamId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Date)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Date)
            @Html.ValidationMessageFor(model => model.Date)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.GameOrder)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.GameOrder)
            @Html.ValidationMessageFor(model => model.GameOrder)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TourNumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TourNumber)
            @Html.ValidationMessageFor(model => model.TourNumber)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SeasonDivisionId, "SeasonDivision")
        </div>
        <div class="editor-field">
            @Html.DropDownList("SeasonDivisionId", String.Empty)
            @Html.ValidationMessageFor(model => model.SeasonDivisionId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.HomeScore)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HomeScore)
            @Html.ValidationMessageFor(model => model.HomeScore)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RoadScore)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RoadScore)
            @Html.ValidationMessageFor(model => model.RoadScore)
        </div>

         <div class="editor-label">
            @Html.LabelFor(model => model.TechnicalDefeat)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TechnicalDefeat)
            @Html.ValidationMessageFor(model => model.TechnicalDefeat)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
